| Fully Qualified Name: | Laminas\Mvc\Console\Service\ConsoleAdapterFactory |
| Implements: | FactoryInterface |
| Name | Description | Defined By |
|---|---|---|
| __invoke() | Create and return a Console adapter instance. | ConsoleAdapterFactory |
| createService() | Create and return AdapterInterface instance | ConsoleAdapterFactory |
Create and return a Console adapter instance.
In case we're not in a Console environment, return a dummy stdClass object.
In order to disable adapter auto-detection and use a specific adapter (and charset), add the following fields to application configuration, for example:
'console' => array(
'adapter' => 'MyConsoleAdapter', // always use this console adapter
'charset' => 'MyConsoleCharset', // always use this console charset
),
'service_manager' => array(
'invokables' => array(
'MyConsoleAdapter' => 'Laminas\Console\Adapter\Windows',
'MyConsoleCharset' => 'Laminas\Console\Charset\DESCG',
)
)
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ContainerInterface | |
| $name | string | |
| $options | null|array |
Returns: \AdapterInterface|\stdClass
Create and return AdapterInterface instance
For use with laminas-servicemanager v2; proxies to __invoke().
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ServiceLocatorInterface |
Returns: \AdapterInterface|\stdClass